{% extends "bootstrap/base.html" %}
{% block title %}首页{% endblock %}
{% block styles %}
    {{ super() }}
    <style>
    #myfoot{
        font-size: 14px;
        text-align: center;
        color:black;
        border-top:1px solid darkgray;
    }
    </style>
{% endblock %}
{% block navbar %}
<nav class="navbar navbar-default">
  <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <a class="navbar-brand" href="#">留言板</a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
        <li class="active"><a href="{{ url_for('user.show') }}">首页<span class="sr-only">(current)</span></a></li>
        <li><a href="#">关于我</a></li>
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">API漏洞<span class="caret"></span></a>
          <ul class="dropdown-menu">
            <li><a href="#">失效的对象级授权</a></li>
            <li role="separator" class="divider"></li>
            <li><a href="#">失效的用户身份认证</a></li>
            <li role="separator" class="divider"></li>
            <li><a href="#">过度的数据暴露</a></li>
              <li role="separator" class="divider"></li>
            <li><a href="#">资源缺乏以及速率限制</a></li>
              <li role="separator" class="divider"></li>
            <li><a href="#">失效的功能级授权</a></li>
              <li role="separator" class="divider"></li>
            <li><a href="#">批量分配</a></li>
              <li role="separator" class="divider"></li>
            <li><a href="#">安全配置错误</a></li>
              <li role="separator" class="divider"></li>
            <li><a href="#">注入</a></li>
              <li role="separator" class="divider"></li>
            <li><a href="#">用户管理不当</a></li>
              <li role="separator" class="divider"></li>
            <li><a href="#">日志与监视不足</a></li>
          </ul>
        </li>
      </ul>
      <form class="navbar-form navbar-left">
        <div class="form-group">
          <input type="text" class="form-control" placeholder="搜索">
        </div>
        <button type="submit" class="btn btn-default">搜索</button>
      </form>
      <ul class="nav navbar-nav navbar-right">
          {% if user %}
              <li><a href="#">欢迎！{{ user.username }}</a></li>
              <li><a href="{{ url_for('user.logout') }}">登出</a></li>
                  {% if user.grade == 1 %}
                     <li><a href="{{ url_for('user.index') }}">管理用户</a></li>
                  {% endif %}
          {% else %}
              <li><a href="{{ url_for('user.login') }}">登录</a></li>
              <li><a href="{{ url_for('user.register') }}">注册</a></li>
          {% endif %}

      </ul>
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>
{% endblock %}

{% block content %}
    {% block newcontent %}
    <h1>Hello, Bootstrap</h1>
    {% endblock %}

    {% block footer %}
    <p id="myfoot">软件1901：徐浬豪 胡思鹏 李隆桢 柴武斌</p>
    {% endblock %}
{% endblock %}


